3.139 \(\int \frac {a+b \tan ^{-1}(c x)}{x^2 (d+e x)} \, dx\)

Optimal. Leaf size=232 \[ -\frac {e \log \left (\frac {2}{1-i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )}{d^2}+\frac {e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2 c (d+e x)}{(1-i c x) (c d+i e)}\right )}{d^2}-\frac {a+b \tan ^{-1}(c x)}{d x}-\frac {a e \log (x)}{d^2}-\frac {b c \log \left (c^2 x^2+1\right )}{2 d}-\frac {i b e \text {Li}_2(-i c x)}{2 d^2}+\frac {i b e \text {Li}_2(i c x)}{2 d^2}+\frac {i b e \text {Li}_2\left (1-\frac {2}{1-i c x}\right )}{2 d^2}-\frac {i b e \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{2 d^2}+\frac {b c \log (x)}{d} \]

[Out]

(-a-b*arctan(c*x))/d/x+b*c*ln(x)/d-a*e*ln(x)/d^2-e*(a+b*arctan(c*x))*ln(2/(1-I*c*x))/d^2+e*(a+b*arctan(c*x))*l
n(2*c*(e*x+d)/(c*d+I*e)/(1-I*c*x))/d^2-1/2*b*c*ln(c^2*x^2+1)/d-1/2*I*b*e*polylog(2,-I*c*x)/d^2+1/2*I*b*e*polyl
og(2,I*c*x)/d^2+1/2*I*b*e*polylog(2,1-2/(1-I*c*x))/d^2-1/2*I*b*e*polylog(2,1-2*c*(e*x+d)/(c*d+I*e)/(1-I*c*x))/
d^2

________________________________________________________________________________________

Rubi [A]  time = 0.24, antiderivative size = 232, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 12, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.632, Rules used = {4876, 4852, 266, 36, 29, 31, 4848, 2391, 4856, 2402, 2315, 2447} \[ -\frac {i b e \text {PolyLog}(2,-i c x)}{2 d^2}+\frac {i b e \text {PolyLog}(2,i c x)}{2 d^2}+\frac {i b e \text {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{2 d^2}-\frac {i b e \text {PolyLog}\left (2,1-\frac {2 c (d+e x)}{(1-i c x) (c d+i e)}\right )}{2 d^2}-\frac {e \log \left (\frac {2}{1-i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )}{d^2}+\frac {e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2 c (d+e x)}{(1-i c x) (c d+i e)}\right )}{d^2}-\frac {a+b \tan ^{-1}(c x)}{d x}-\frac {a e \log (x)}{d^2}-\frac {b c \log \left (c^2 x^2+1\right )}{2 d}+\frac {b c \log (x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTan[c*x])/(x^2*(d + e*x)),x]

[Out]

-((a + b*ArcTan[c*x])/(d*x)) + (b*c*Log[x])/d - (a*e*Log[x])/d^2 - (e*(a + b*ArcTan[c*x])*Log[2/(1 - I*c*x)])/
d^2 + (e*(a + b*ArcTan[c*x])*Log[(2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/d^2 - (b*c*Log[1 + c^2*x^2])/(2*d
) - ((I/2)*b*e*PolyLog[2, (-I)*c*x])/d^2 + ((I/2)*b*e*PolyLog[2, I*c*x])/d^2 + ((I/2)*b*e*PolyLog[2, 1 - 2/(1
- I*c*x)])/d^2 - ((I/2)*b*e*PolyLog[2, 1 - (2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/d^2

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2402

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> -Dist[e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2447

Int[Log[u_]*(Pq_)^(m_.), x_Symbol] :> With[{C = FullSimplify[(Pq^m*(1 - u))/D[u, x]]}, Simp[C*PolyLog[2, 1 - u
], x] /; FreeQ[C, x]] /; IntegerQ[m] && PolyQ[Pq, x] && RationalFunctionQ[u, x] && LeQ[RationalFunctionExponen
ts[u, x][[2]], Expon[Pq, x]]

Rule 4848

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[(I*b)/2, Int[Log[1 - I*c*x
]/x, x], x] - Dist[(I*b)/2, Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 4852

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
n[c*x])^p)/(d*(m + 1)), x] - Dist[(b*c*p)/(d*(m + 1)), Int[((d*x)^(m + 1)*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^
2*x^2), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[p, 0] && (EqQ[p, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 4856

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTan[c*x])*Log[2/(1 -
 I*c*x)])/e, x] + (Dist[(b*c)/e, Int[Log[2/(1 - I*c*x)]/(1 + c^2*x^2), x], x] - Dist[(b*c)/e, Int[Log[(2*c*(d
+ e*x))/((c*d + I*e)*(1 - I*c*x))]/(1 + c^2*x^2), x], x] + Simp[((a + b*ArcTan[c*x])*Log[(2*c*(d + e*x))/((c*d
 + I*e)*(1 - I*c*x))])/e, x]) /; FreeQ[{a, b, c, d, e}, x] && NeQ[c^2*d^2 + e^2, 0]

Rule 4876

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Int[Ex
pandIntegrand[(a + b*ArcTan[c*x])^p, (f*x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p,
 0] && IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])

Rubi steps

\begin {align*} \int \frac {a+b \tan ^{-1}(c x)}{x^2 (d+e x)} \, dx &=\int \left (\frac {a+b \tan ^{-1}(c x)}{d x^2}-\frac {e \left (a+b \tan ^{-1}(c x)\right )}{d^2 x}+\frac {e^2 \left (a+b \tan ^{-1}(c x)\right )}{d^2 (d+e x)}\right ) \, dx\\ &=\frac {\int \frac {a+b \tan ^{-1}(c x)}{x^2} \, dx}{d}-\frac {e \int \frac {a+b \tan ^{-1}(c x)}{x} \, dx}{d^2}+\frac {e^2 \int \frac {a+b \tan ^{-1}(c x)}{d+e x} \, dx}{d^2}\\ &=-\frac {a+b \tan ^{-1}(c x)}{d x}-\frac {a e \log (x)}{d^2}-\frac {e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1-i c x}\right )}{d^2}+\frac {e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{d^2}+\frac {(b c) \int \frac {1}{x \left (1+c^2 x^2\right )} \, dx}{d}-\frac {(i b e) \int \frac {\log (1-i c x)}{x} \, dx}{2 d^2}+\frac {(i b e) \int \frac {\log (1+i c x)}{x} \, dx}{2 d^2}+\frac {(b c e) \int \frac {\log \left (\frac {2}{1-i c x}\right )}{1+c^2 x^2} \, dx}{d^2}-\frac {(b c e) \int \frac {\log \left (\frac {2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{1+c^2 x^2} \, dx}{d^2}\\ &=-\frac {a+b \tan ^{-1}(c x)}{d x}-\frac {a e \log (x)}{d^2}-\frac {e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1-i c x}\right )}{d^2}+\frac {e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{d^2}-\frac {i b e \text {Li}_2(-i c x)}{2 d^2}+\frac {i b e \text {Li}_2(i c x)}{2 d^2}-\frac {i b e \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{2 d^2}+\frac {(b c) \operatorname {Subst}\left (\int \frac {1}{x \left (1+c^2 x\right )} \, dx,x,x^2\right )}{2 d}+\frac {(i b e) \operatorname {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-i c x}\right )}{d^2}\\ &=-\frac {a+b \tan ^{-1}(c x)}{d x}-\frac {a e \log (x)}{d^2}-\frac {e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1-i c x}\right )}{d^2}+\frac {e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{d^2}-\frac {i b e \text {Li}_2(-i c x)}{2 d^2}+\frac {i b e \text {Li}_2(i c x)}{2 d^2}+\frac {i b e \text {Li}_2\left (1-\frac {2}{1-i c x}\right )}{2 d^2}-\frac {i b e \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{2 d^2}+\frac {(b c) \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )}{2 d}-\frac {\left (b c^3\right ) \operatorname {Subst}\left (\int \frac {1}{1+c^2 x} \, dx,x,x^2\right )}{2 d}\\ &=-\frac {a+b \tan ^{-1}(c x)}{d x}+\frac {b c \log (x)}{d}-\frac {a e \log (x)}{d^2}-\frac {e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1-i c x}\right )}{d^2}+\frac {e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{d^2}-\frac {b c \log \left (1+c^2 x^2\right )}{2 d}-\frac {i b e \text {Li}_2(-i c x)}{2 d^2}+\frac {i b e \text {Li}_2(i c x)}{2 d^2}+\frac {i b e \text {Li}_2\left (1-\frac {2}{1-i c x}\right )}{2 d^2}-\frac {i b e \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{2 d^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.15, size = 223, normalized size = 0.96 \[ -\frac {-2 a e x \log (d+e x)+2 a d+2 a e x \log (x)+b c d x \log \left (c^2 x^2+1\right )-i b e x \text {Li}_2\left (\frac {e (1-i c x)}{i c d+e}\right )+i b e x \text {Li}_2\left (-\frac {e (c x-i)}{c d+i e}\right )-i b e x \log (1-i c x) \log \left (\frac {c (d+e x)}{c d-i e}\right )+i b e x \log (1+i c x) \log \left (\frac {c (d+e x)}{c d+i e}\right )-2 b c d x \log (x)+2 b d \tan ^{-1}(c x)+i b e x \text {Li}_2(-i c x)-i b e x \text {Li}_2(i c x)}{2 d^2 x} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*ArcTan[c*x])/(x^2*(d + e*x)),x]

[Out]

-1/2*(2*a*d + 2*b*d*ArcTan[c*x] - 2*b*c*d*x*Log[x] + 2*a*e*x*Log[x] - 2*a*e*x*Log[d + e*x] - I*b*e*x*Log[1 - I
*c*x]*Log[(c*(d + e*x))/(c*d - I*e)] + I*b*e*x*Log[1 + I*c*x]*Log[(c*(d + e*x))/(c*d + I*e)] + b*c*d*x*Log[1 +
 c^2*x^2] + I*b*e*x*PolyLog[2, (-I)*c*x] - I*b*e*x*PolyLog[2, I*c*x] - I*b*e*x*PolyLog[2, (e*(1 - I*c*x))/(I*c
*d + e)] + I*b*e*x*PolyLog[2, -((e*(-I + c*x))/(c*d + I*e))])/(d^2*x)

________________________________________________________________________________________

fricas [F]  time = 0.81, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b \arctan \left (c x\right ) + a}{e x^{3} + d x^{2}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))/x^2/(e*x+d),x, algorithm="fricas")

[Out]

integral((b*arctan(c*x) + a)/(e*x^3 + d*x^2), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))/x^2/(e*x+d),x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

maple [A]  time = 0.06, size = 321, normalized size = 1.38 \[ -\frac {a}{d x}-\frac {a e \ln \left (c x \right )}{d^{2}}+\frac {a e \ln \left (c e x +d c \right )}{d^{2}}-\frac {b \arctan \left (c x \right )}{d x}-\frac {b \arctan \left (c x \right ) e \ln \left (c x \right )}{d^{2}}+\frac {b \arctan \left (c x \right ) e \ln \left (c e x +d c \right )}{d^{2}}+\frac {i b e \dilog \left (\frac {-c e x +i e}{d c +i e}\right )}{2 d^{2}}+\frac {i b e \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2 d^{2}}-\frac {i b e \dilog \left (i c x +1\right )}{2 d^{2}}-\frac {i b e \dilog \left (\frac {c e x +i e}{-d c +i e}\right )}{2 d^{2}}+\frac {c b \ln \left (c x \right )}{d}-\frac {b c \ln \left (c^{2} x^{2}+1\right )}{2 d}+\frac {i b e \dilog \left (-i c x +1\right )}{2 d^{2}}-\frac {i b e \ln \left (c x \right ) \ln \left (i c x +1\right )}{2 d^{2}}-\frac {i b e \ln \left (c e x +d c \right ) \ln \left (\frac {c e x +i e}{-d c +i e}\right )}{2 d^{2}}+\frac {i b e \ln \left (c e x +d c \right ) \ln \left (\frac {-c e x +i e}{d c +i e}\right )}{2 d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctan(c*x))/x^2/(e*x+d),x)

[Out]

-a/d/x-a/d^2*e*ln(c*x)+a/d^2*e*ln(c*e*x+c*d)-b*arctan(c*x)/d/x-b*arctan(c*x)/d^2*e*ln(c*x)+b*arctan(c*x)/d^2*e
*ln(c*e*x+c*d)+1/2*I*b/d^2*e*dilog(1-I*c*x)+1/2*I*b/d^2*e*ln(c*x)*ln(1-I*c*x)+1/2*I*b/d^2*e*dilog((I*e-c*e*x)/
(d*c+I*e))-1/2*I*b/d^2*e*dilog((I*e+c*e*x)/(I*e-d*c))+c*b/d*ln(c*x)-1/2*b*c*ln(c^2*x^2+1)/d-1/2*I*b/d^2*e*dilo
g(1+I*c*x)-1/2*I*b/d^2*e*ln(c*x)*ln(1+I*c*x)-1/2*I*b/d^2*e*ln(c*e*x+c*d)*ln((I*e+c*e*x)/(I*e-d*c))+1/2*I*b/d^2
*e*ln(c*e*x+c*d)*ln((I*e-c*e*x)/(d*c+I*e))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a {\left (\frac {e \log \left (e x + d\right )}{d^{2}} - \frac {e \log \relax (x)}{d^{2}} - \frac {1}{d x}\right )} + 2 \, b \int \frac {\arctan \left (c x\right )}{2 \, {\left (e x^{3} + d x^{2}\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))/x^2/(e*x+d),x, algorithm="maxima")

[Out]

a*(e*log(e*x + d)/d^2 - e*log(x)/d^2 - 1/(d*x)) + 2*b*integrate(1/2*arctan(c*x)/(e*x^3 + d*x^2), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {a+b\,\mathrm {atan}\left (c\,x\right )}{x^2\,\left (d+e\,x\right )} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atan(c*x))/(x^2*(d + e*x)),x)

[Out]

int((a + b*atan(c*x))/(x^2*(d + e*x)), x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atan(c*x))/x**2/(e*x+d),x)

[Out]

Timed out

________________________________________________________________________________________